home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / machserver / 1.098 / ofs / ofsFileDesc.c < prev    next >
C/C++ Source or Header  |  1991-05-06  |  17KB  |  587 lines

  1. /* 
  2.  * ofsFileDesc.c --
  3.  *
  4.  *    Routines to allocate, initialize, and free file descriptors for the
  5.  *      OFS domain file systems.
  6.  *
  7.  * Copyright 1987 Regents of the University of California
  8.  * All rights reserved.
  9.  * Permission to use, copy, modify, and distribute this
  10.  * software and its documentation for any purpose and without
  11.  * fee is hereby granted, provided that the above copyright
  12.  * notice appear in all copies.  The University of California
  13.  * makes no representations about the suitability of this
  14.  * software for any purpose.  It is provided "as is" without
  15.  * express or implied warranty.
  16.  */
  17.  
  18. #ifndef lint
  19. static char rcsid[] = "$Header: /sprite/src/kernel/ofs/RCS/ofsFileDesc.c,v 9.5 91/01/26 15:34:50 mgbaker Exp $ SPRITE (Berkeley)";
  20. #endif not lint
  21.  
  22. #include <sprite.h>
  23. #include <fs.h>
  24. #include <fsutil.h>
  25. #include <fslcl.h>
  26. #include <fsNameOps.h>
  27. #include <fsio.h>
  28. #include <fsStat.h>
  29. #include <fsdm.h>
  30. #include <ofs.h>
  31. #include <stdio.h>
  32.  
  33. #define LOCKPTR (&ofsPtr->fileDescLock)
  34.  
  35. /*
  36.  * Array to provide the ability to set and extract bits out of a bitmap byte.
  37.  */
  38. static unsigned char bitmasks[8] = {0x80, 0x40, 0x20, 0x10, 0x8, 0x4, 0x2, 0x1};
  39.  
  40. int    fsdmDescSearchStarts = 0;
  41. int    fsdmDescBytesSearched = 0;
  42.  
  43. /*
  44.  *----------------------------------------------------------------------
  45.  *
  46.  * OfsFileDescAllocInit --
  47.  *
  48.  *    Initialize the data structure needed for allocation of file
  49.  *    descriptors.
  50.  *
  51.  * Results:
  52.  *    None.
  53.  *
  54.  * Side effects:
  55.  *    Memory allocated for the bit map and the bit map is read in.
  56.  *
  57.  *----------------------------------------------------------------------
  58.  */
  59.  
  60. ReturnStatus
  61. OfsFileDescAllocInit(ofsPtr)
  62.     register Ofs_Domain *ofsPtr;
  63. {
  64.     register ReturnStatus    status;
  65.  
  66.     Sync_LockInitDynamic(&(ofsPtr->fileDescLock), "Fs:fileDescLock");
  67.     /*
  68.      * Allocate the bit map.
  69.      */
  70.  
  71.     ofsPtr->fileDescBitmap = (unsigned char *) 
  72.     malloc(ofsPtr->headerPtr->fdBitmapBlocks * FS_BLOCK_SIZE);
  73.  
  74.     /* 
  75.      * Read in the bit map.
  76.      */
  77.  
  78.     status = OfsDeviceBlockIO(ofsPtr, FS_READ, 
  79.             ofsPtr->headerPtr->fdBitmapOffset * 4, 
  80.             ofsPtr->headerPtr->fdBitmapBlocks * 4,
  81.             (Address) ofsPtr->fileDescBitmap);
  82.     if (status != SUCCESS) {
  83.     printf( "Could not read in OFS file descriptor bit map.\n");
  84.     return(status);
  85.     } else {
  86.     fs_Stats.gen.physBytesRead += FS_BLOCK_SIZE;
  87.     }
  88.     return(SUCCESS);
  89. }
  90.  
  91. /*
  92.  *----------------------------------------------------------------------
  93.  *
  94.  * OfsWriteBackFileDescBitmap() --
  95.  *
  96.  *    Write the file descriptor bit map out to disk for this domain.
  97.  *
  98.  * Results:
  99.  *    Error if the write failed.
  100.  *
  101.  * Side effects:
  102.  *    None.
  103.  *
  104.  *----------------------------------------------------------------------
  105.  */
  106.  
  107. ENTRY ReturnStatus
  108. OfsWriteBackFileDescBitmap(ofsPtr)
  109.     register Ofs_Domain *ofsPtr;
  110. {
  111.     register ReturnStatus    status;
  112.  
  113.     LOCK_MONITOR;
  114.  
  115.     status = OfsDeviceBlockIO(ofsPtr, FS_WRITE,
  116.             ofsPtr->headerPtr->fdBitmapOffset * 4, 
  117.             ofsPtr->headerPtr->fdBitmapBlocks * 4,
  118.             (Address) ofsPtr->fileDescBitmap);
  119.     if (status != SUCCESS) {
  120.     printf( "Could not write out OFS file desc bit map.\n");
  121.     } else {
  122.     fs_Stats.gen.physBytesWritten += FS_BLOCK_SIZE;
  123.     }
  124.  
  125.     UNLOCK_MONITOR;
  126.     return(status);
  127. }
  128.  
  129. /*
  130.  *----------------------------------------------------------------------
  131.  *
  132.  * Ofs_GetNewFileNumber() --
  133.  *
  134.  *    Get a new file number by allocating a free file descriptor
  135.  *    from the file descriptor bitmap.
  136.  *
  137.  * Results:
  138.  *    An error if could not find a free file descriptor.
  139.  *
  140.  * Side effects:
  141.  *    fileNumberPtr is set to the number of the file descriptor allocated.
  142.  *
  143.  *----------------------------------------------------------------------
  144.  */
  145.  
  146. ENTRY ReturnStatus
  147. Ofs_GetNewFileNumber(domainPtr, dirFileNum, fileNumberPtr)
  148.     Fsdm_Domain     *domainPtr;    /* Domain to allocate the file 
  149.                      * descriptor out of. */
  150.     int            dirFileNum;    /* File number of the directory that
  151.                        the file is in.  -1 means that
  152.                        this file descriptor is being
  153.                        allocated for a directory. */
  154.     int            *fileNumberPtr; /* Place to return the number of
  155.                        the file descriptor allocated. */
  156. {
  157.     register Ofs_Domain        *ofsPtr = OFS_PTR_FROM_DOMAIN(domainPtr);
  158.     register int            i;
  159.     register int        j;
  160.     int                startByte;
  161.     register unsigned char     *bitmapPtr;
  162.     register unsigned char     *bitmaskPtr;
  163.     Boolean               found = FALSE;
  164.     int                   descBytes;
  165.  
  166.     LOCK_MONITOR;
  167.     fsdmDescSearchStarts++;
  168.     descBytes = ofsPtr->headerPtr->numFileDesc >> 3;
  169.     
  170.     if (dirFileNum == -1) {
  171.     /*
  172.      * Search linearly from a random starting byte.
  173.      */
  174.     startByte = ((Fsutil_TimeInSeconds() * 1103515245 + 12345) & 0x7fffffff) % 
  175.             descBytes;
  176.     } else {
  177.     /*
  178.      * Start search where directory is.
  179.      */
  180.     startByte = dirFileNum / 8;
  181.     }
  182.  
  183.     /*
  184.      * Linear search forward the bit map a byte at a time.
  185.      */
  186.     bitmapPtr = &(ofsPtr->fileDescBitmap[startByte]);
  187.     i = startByte;
  188.     do {
  189.     fsdmDescBytesSearched++;
  190.     if (*bitmapPtr != 0xff) {
  191.         found = TRUE;
  192.         break;
  193.     }
  194.     i++;
  195.     if (i == descBytes) {
  196.         i = 0;
  197.         bitmapPtr = ofsPtr->fileDescBitmap;
  198.     } else {
  199.         bitmapPtr++;
  200.     }
  201.     } while (i != startByte);
  202.  
  203.     if (!found) {
  204.     printf( "Out of file descriptors.\n");
  205.     UNLOCK_MONITOR;
  206.     return(FAILURE);
  207.     }
  208.  
  209.     ofsPtr->summaryInfoPtr->numFreeFileDesc--;
  210.     /*
  211.      * Now find which file descriptor is free within the byte.
  212.      */
  213.     for (j = 0, bitmaskPtr = bitmasks; 
  214.      j < 8 && (*bitmapPtr & *bitmaskPtr) != 0; 
  215.      j++, bitmaskPtr++) {
  216.     }
  217.     *fileNumberPtr = i * 8 + j;
  218.     *bitmapPtr |= *bitmaskPtr;
  219.  
  220.     UNLOCK_MONITOR;
  221.  
  222.     return(SUCCESS);
  223. }
  224.  
  225.  
  226. /*
  227.  *----------------------------------------------------------------------
  228.  *
  229.  * Ofs_FreeFileNumber() --
  230.  *
  231.  *    Free a file number by clearing the corresponding bit the in
  232.  *    file descriptor bit map.
  233.  *
  234.  * Results:
  235.  *    SUCCESS.
  236.  *
  237.  * Side effects:
  238.  *    Bit map modified.
  239.  *
  240.  *----------------------------------------------------------------------
  241.  */
  242.  
  243. ENTRY ReturnStatus
  244. Ofs_FreeFileNumber(domainPtr, fileNumber)
  245.     register Fsdm_Domain *domainPtr;    /* Domain that the file 
  246.                      * descriptor is in. */
  247.     int            fileNumber;     /* Number of file descriptor to 
  248.                        free.*/
  249. {
  250.     Ofs_Domain    *ofsPtr = OFS_PTR_FROM_DOMAIN(domainPtr);
  251.     LOCK_MONITOR;
  252.     ofsPtr->summaryInfoPtr->numFreeFileDesc++;
  253.     ofsPtr->fileDescBitmap[fileNumber / 8] &= ~bitmasks[fileNumber & 0x7];
  254.     UNLOCK_MONITOR;
  255.     return SUCCESS;
  256. }
  257.  
  258.  
  259. /*
  260.  *----------------------------------------------------------------------
  261.  *
  262.  * Ofs_FileDescInit() --
  263.  *
  264.  *    Initialize a new file descriptor.
  265.  *
  266.  * Results:
  267.  *    An error if could not read the file descriptor from disk.
  268.  *
  269.  * Side effects:
  270.  *    The file decriptor is initialized.
  271.  *
  272.  *----------------------------------------------------------------------
  273.  */
  274.  
  275. ReturnStatus
  276. Ofs_FileDescInit(domainPtr, fileNumber, type, permissions, uid, gid, fileDescPtr)
  277.     register Fsdm_Domain *domainPtr;    /* Domain of the file */
  278.     int            fileNumber;     /* Number of file descriptor */
  279.     int            type;        /* Type of the file */
  280.     int            permissions;    /* Permission bits for the file */
  281.     int            uid;        /* Owner ID for the file */
  282.     int            gid;        /* Group ID for the file */
  283.     register Fsdm_FileDescriptor    *fileDescPtr;    /* File descriptor structure to
  284.                        initialize. */
  285. {
  286.     ReturnStatus status;
  287.     register int index;
  288.  
  289.     /*
  290.      * Fetch the file descriptor and do rudimentation consistency checks.
  291.      * This also gets its block into the cache which will happen sooner
  292.      * or later anyway.
  293.      */
  294.     status = Ofs_FileDescFetch(domainPtr, fileNumber, fileDescPtr);
  295.     if (status != SUCCESS) {
  296.     return(status);
  297.     }
  298.     if (fileDescPtr->flags & FSDM_FD_ALLOC) {
  299.     printf( "Ofs_FileDescInit fetched non-free file desc\n");
  300.     return(FS_FILE_EXISTS);
  301.     }
  302.     fileDescPtr->magic = FSDM_FD_MAGIC;
  303.     fileDescPtr->flags = FSDM_FD_ALLOC|FSDM_FD_DIRTY;
  304.     fileDescPtr->fileType = type;
  305.     fileDescPtr->permissions = permissions;
  306.     fileDescPtr->uid = uid;
  307.     fileDescPtr->gid = gid;
  308.     fileDescPtr->lastByte = -1;
  309.     fileDescPtr->firstByte = -1;
  310.     fileDescPtr->userType = FS_USER_TYPE_UNDEFINED;
  311.     fileDescPtr->numLinks = 1;
  312.     fileDescPtr->numKbytes = 0;
  313.     /*
  314.      * Give this new file a new version number.  The increment is by 2 to
  315.      * ensure that a client invalidates any cache blocks associated with
  316.      * the previous incarnation of the file.  Remember that when a client
  317.      * opens for writing a version number 1 greater means that its old
  318.      * cache blocks are still ok, and also remember that clients with
  319.      * clean blocks are not told when a file is deleted.
  320.      */
  321.     fileDescPtr->version += 2;
  322.  
  323.     /*
  324.      * Clear out device info.  It is set up properly by the make-device routine.
  325.      */
  326.     fileDescPtr->devServerID = -1;
  327.     fileDescPtr->devType = -1;
  328.     fileDescPtr->devUnit = -1;
  329.  
  330.     /*
  331.      * Set the time stamps.  These times should come from the client.
  332.      */
  333.     fileDescPtr->createTime = Fsutil_TimeInSeconds();
  334.     fileDescPtr->accessTime = fileDescPtr->createTime;
  335.     fileDescPtr->descModifyTime = fileDescPtr->createTime;
  336.     fileDescPtr->dataModifyTime = fileDescPtr->createTime;
  337.  
  338.     for (index = 0; index < FSDM_NUM_DIRECT_BLOCKS ; index++) {
  339.     fileDescPtr->direct[index] = FSDM_NIL_INDEX;
  340.     }
  341.     for (index = 0; index < FSDM_NUM_INDIRECT_BLOCKS ; index++) {
  342.     fileDescPtr->indirect[index] = FSDM_NIL_INDEX;
  343.     }
  344.     return(SUCCESS);
  345. }
  346.  
  347. /*
  348.  *----------------------------------------------------------------------
  349.  *
  350.  * Ofs_FileDescFetch() --
  351.  *
  352.  *    Fetch the given file descriptor from disk and store it into
  353.  *    *fileDescPtr.
  354.  *
  355.  * Results:
  356.  *    An error if could not read the file descriptor from disk.
  357.  *
  358.  * Side effects:
  359.  *    *fileDescPtr is modified.
  360.  *
  361.  *----------------------------------------------------------------------
  362.  */
  363.  
  364. ReturnStatus
  365. Ofs_FileDescFetch(domainPtr, fileNumber, fileDescPtr)
  366.      Fsdm_Domain     *domainPtr;    /* Domain to fetch the file 
  367.                      * descriptor from. */
  368.     register int    fileNumber;     /* Number of file descriptor to 
  369.                        fetch.*/
  370.     Fsdm_FileDescriptor    *fileDescPtr;    /* File descriptor structure to
  371.                        initialize. */
  372. {
  373.     register Ofs_Domain          *ofsPtr = OFS_PTR_FROM_DOMAIN(domainPtr);
  374.     register ReturnStatus     status;
  375.     register Ofs_DomainHeader *headerPtr;
  376.     register int         blockNum;
  377.     int             offset;
  378.     Fscache_Block        *blockPtr;
  379.     Boolean            found;
  380. #ifdef SOSP91
  381.     Boolean        isForeign = FALSE;    /* Due to migration? */
  382. #endif SOSP91
  383.  
  384.     headerPtr = ofsPtr->headerPtr;
  385.     blockNum = headerPtr->fileDescOffset + fileNumber / FSDM_FILE_DESC_PER_BLOCK;
  386.     offset = (fileNumber & (FSDM_FILE_DESC_PER_BLOCK - 1)) *
  387.         FSDM_MAX_FILE_DESC_SIZE;
  388.  
  389. #ifdef SOSP91
  390.     if (proc_RunningProcesses[0] != (Proc_ControlBlock *) NIL) {
  391.     if ((proc_RunningProcesses[0]->state == PROC_MIGRATED) ||
  392.         (proc_RunningProcesses[0]->genFlags &
  393.         (PROC_FOREIGN | PROC_MIGRATING))) {
  394.         isForeign = TRUE;
  395.     }
  396.     }
  397. #endif SOSP91
  398.     fs_Stats.blockCache.fileDescReads++;
  399. #ifdef SOSP91
  400.     if (isForeign) {
  401.     fs_SospMigStats.blockCache.fileDescReads++;
  402.     }
  403. #endif SOSP91
  404.     Fscache_FetchBlock(&ofsPtr->physHandle.cacheInfo, blockNum, 
  405.               FSCACHE_DESC_BLOCK, &blockPtr, &found);
  406.     if (!found) {
  407.     status = OfsDeviceBlockIO(ofsPtr, FS_READ, 
  408.                blockNum * FS_FRAGMENTS_PER_BLOCK,
  409.                FS_FRAGMENTS_PER_BLOCK, blockPtr->blockAddr);
  410.     if (status != SUCCESS) {
  411.         printf( "Could not read in file descriptor\n");
  412.         Fscache_UnlockBlock(blockPtr, 0, -1, 0, FSCACHE_DELETE_BLOCK);
  413.         return(status);
  414.     } else {
  415.         fs_Stats.gen.physBytesRead += FS_BLOCK_SIZE;
  416.     }
  417.     } else {
  418.     fs_Stats.blockCache.fileDescReadHits++;
  419. #ifdef SOSP91
  420.     if (isForeign) {
  421.         fs_SospMigStats.blockCache.fileDescReadHits++;
  422.     }
  423. #endif SOSP91
  424.     }
  425.     bcopy(blockPtr->blockAddr + offset, (Address) fileDescPtr,
  426.     sizeof(Fsdm_FileDescriptor));
  427.     Fscache_UnlockBlock(blockPtr, 0, blockNum * FS_FRAGMENTS_PER_BLOCK, 
  428.                 FS_BLOCK_SIZE, 0);
  429.  
  430.     if (fileDescPtr->magic != FSDM_FD_MAGIC) {
  431.     printf( "Fsdm_FileDescFetch found junky file desc\n");
  432.     return(FAILURE);
  433.     } else {
  434.     return(SUCCESS);
  435.     }
  436. }
  437.  
  438.  
  439. /*
  440.  *----------------------------------------------------------------------
  441.  *
  442.  * Ofs_FileDescStore() --
  443.  *
  444.  *    Store the given file descriptor back into the file system block
  445.  *    where it came from.  This involves putting the block back into
  446.  *    the cache.
  447.  *
  448.  * Results:
  449.  *    An error if could not read the file descriptor from disk.
  450.  *
  451.  * Side effects:
  452.  *    Cache block is modified.
  453.  *
  454.  *----------------------------------------------------------------------
  455.  */
  456.  
  457. ReturnStatus
  458. Ofs_FileDescStore(domainPtr, handlePtr, fileNumber, fileDescPtr, forceOut)
  459.     register Fsdm_Domain *domainPtr;    /* Domain to store the file 
  460.                      * descriptor into. */
  461.     Fsio_FileIOHandle    *handlePtr;
  462.     int            fileNumber;     /* Number of file descriptor to 
  463.                        store.*/
  464.     Fsdm_FileDescriptor    *fileDescPtr;     /* File descriptor to store. */
  465.     Boolean        forceOut;  /* Force the change to disk. */
  466. {
  467.     Ofs_Domain    *ofsPtr = OFS_PTR_FROM_DOMAIN(domainPtr);
  468.     register ReturnStatus   status = SUCCESS;
  469.     register Ofs_DomainHeader *headerPtr;
  470.     register int         blockNum;
  471.     int             offset;
  472.     Fscache_Block        *blockPtr;
  473.     Boolean            found;
  474. #ifdef SOSP91
  475.     Boolean        isForeign = FALSE;    /* Due to migration? */
  476. #endif SOSP91
  477.  
  478.     headerPtr = ofsPtr->headerPtr;
  479.     blockNum = headerPtr->fileDescOffset + fileNumber / FSDM_FILE_DESC_PER_BLOCK;
  480.     offset = (fileNumber & (FSDM_FILE_DESC_PER_BLOCK - 1)) *
  481.         FSDM_MAX_FILE_DESC_SIZE;
  482.  
  483. #ifdef SOSP91
  484.     if (proc_RunningProcesses[0] != (Proc_ControlBlock *) NIL) {
  485.     if ((proc_RunningProcesses[0]->state == PROC_MIGRATED) ||
  486.         (proc_RunningProcesses[0]->genFlags &
  487.         (PROC_FOREIGN | PROC_MIGRATING))) {
  488.         isForeign = TRUE;
  489.     }
  490.     }
  491. #endif SOSP91
  492.     fs_Stats.blockCache.fileDescWrites++;
  493. #ifdef SOSP91
  494.     if (isForeign) {
  495.     fs_SospMigStats.blockCache.fileDescWrites++;
  496.     }
  497. #endif SOSP91
  498.     Fscache_FetchBlock(&ofsPtr->physHandle.cacheInfo, blockNum, 
  499.               (int)(FSCACHE_IO_IN_PROGRESS | FSCACHE_DESC_BLOCK),
  500.               &blockPtr, &found);
  501.     if (!found) {
  502.     status = OfsDeviceBlockIO(ofsPtr, FS_READ, 
  503.                blockNum * FS_FRAGMENTS_PER_BLOCK,
  504.                FS_FRAGMENTS_PER_BLOCK, blockPtr->blockAddr);
  505.     if (status != SUCCESS) {
  506.         printf( "Could not read in file descriptor\n");
  507.         Fscache_UnlockBlock(blockPtr, 0, blockNum * FS_FRAGMENTS_PER_BLOCK,
  508.                 FS_BLOCK_SIZE, FSCACHE_DELETE_BLOCK);
  509.         return(status);
  510.     } else {
  511.         fs_Stats.gen.physBytesWritten += FS_BLOCK_SIZE;
  512.     }
  513.     } else {
  514.     fs_Stats.blockCache.fileDescWriteHits++;
  515. #ifdef SOSP91
  516.     if (isForeign) {
  517.         fs_SospMigStats.blockCache.fileDescWriteHits++;
  518.     }
  519. #endif SOSP91
  520.     }
  521.     fileDescPtr->flags &= ~FSDM_FD_DIRTY;
  522.     bcopy((Address) fileDescPtr, blockPtr->blockAddr + offset, sizeof(Fsdm_FileDescriptor));
  523.     /*
  524.      * Put the block back into the cache setting the modify time to 1 which
  525.      * will guarantee that the next time the cache is written back this block
  526.      * is written back as well.
  527.      */
  528.     Fscache_UnlockBlock(blockPtr, 1, blockNum * FS_FRAGMENTS_PER_BLOCK,
  529.             FS_BLOCK_SIZE, 0);
  530.     if ((status == SUCCESS) && forceOut) { 
  531.     int    blocksSkipped;
  532. #ifdef SOSP91
  533.     ofsPtr->physHandle.cacheInfo.flags |= FSCACHE_DESC;
  534. #endif SOSP91
  535.     status = Fscache_FileWriteBack(&ofsPtr->physHandle.cacheInfo,
  536.             blockNum, blockNum, FSCACHE_FILE_WB_WAIT, &blocksSkipped);
  537.     if (status != SUCCESS) {
  538.         printf("Ofs_FileDescStore: Couldn't write back desc <%d,%d>\n",
  539.             domainPtr->domainNumber, fileNumber);
  540.     }
  541.     }
  542.  
  543.     return(status);
  544. }
  545.  
  546. /*
  547.  *----------------------------------------------------------------------
  548.  *
  549.  * Ofs_FileDescSync() --
  550.  *
  551.  *    Sync any cached file descriptor to disk.
  552.  *
  553.  * Results:
  554.  *    An error if could not read the file descriptor from disk.
  555.  *
  556.  * Side effects:
  557.  *    Cache block is modified.
  558.  *
  559.  *----------------------------------------------------------------------
  560.  */
  561. ReturnStatus
  562. Ofs_FileDescSync(domainPtr, fileNumber)
  563.     register Fsdm_Domain     *domainPtr;    /* Domain to store the file 
  564.                      * descriptor into. */
  565.     int            fileNumber;     /* Number of file descriptor to 
  566.                        store.*/
  567. {
  568.     Ofs_Domain    *ofsPtr = OFS_PTR_FROM_DOMAIN(domainPtr);
  569.     ReturnStatus status;
  570.     int    blocksSkipped;
  571.     int    blockNum;
  572.  
  573.     blockNum = ofsPtr->headerPtr->fileDescOffset + 
  574.                 fileNumber / FSDM_FILE_DESC_PER_BLOCK;
  575. #ifdef SOSP91
  576.     ofsPtr->physHandle.cacheInfo.flags |= FSCACHE_DESC;
  577. #endif SOSP91
  578.     status = Fscache_FileWriteBack(&ofsPtr->physHandle.cacheInfo,
  579.         blockNum, blockNum, FSCACHE_FILE_WB_WAIT, &blocksSkipped);
  580.     if (status != SUCCESS) {
  581.     printf("Ofs_FileDescSync: Couldn't sync back desc <%d,%d>\n",
  582.         domainPtr->domainNumber, fileNumber);
  583.     }
  584.     return status;
  585.  
  586. }
  587.